package com.qiwenshare.file.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.hibernate.annotations.Comment;

import javax.persistence.*;

/**
 * 操作日志基础信息类
 *
 * @author ma116
 */
@Data
@Table(name = "operationlog")
@Entity
@TableName("operationlog")
public class OperationLogBean {

    /**
     * 操作日志id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    //@TableId(value = "operationLogId",type = IdType.AUTO)
    @TableId
    private Long operationLogId;

    /**
     * 用户id
     */
    @Comment("用户id")
    @Column(length = 20)
    private String userId;

    /**
     * 操作
     */
    @Comment("操作")
    @Column(length = 50)
    private String operation;

    /**
     * 操作对象
     */
    private String operationObj;

    /**
     * 终端IP
     */
    @Comment("终端ip地址")
    @Column(length = 20)
    private String terminal;

    /**
     * 操作结果
     */
    @Comment("操作结果")
    @Column(length = 20)
    private String result;

    /**
     * 操作详情
     */
    @Comment("操作详情")
    @Column(length = 100)
    private String detail;

    /**
     * 操作源
     */
    private String source;

    /**
     * 时间
     */
    @Comment("操作时间")
    @Column(length = 25)
    private String time;

    /**
     * 日志级别 1-正常 2-警告 3-错误
     */
    private Integer logLevel;

    @Comment("平台(1-社区,2-管理端,3-网盘,4-股票)")
    //@Column(columnDefinition="int(2)")
    private Integer platform;

    private String requestURI;
    private String requestMethod;

}
